From 75f4b07a5fef73684af6933711b612a6d3f75098 Mon Sep 17 00:00:00 2001 From: Daniel Colascione Date: Mon, 13 Jan 2014 15:40:16 -0800 Subject: [PATCH] Correctly handle reaching the end of the interval tree. (Bug#15344) --- src/ChangeLog | 5 +++++ src/textprop.c | 13 +++++++++++++ 2 files changed, 18 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index 3ecb36006a0..71a5063b07b 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2014-01-13 Daniel Colascione + + * textprop.c (Fremove_list_of_text_properties): Correctly + handle reaching the end of the interval tree. (Bug#15344) + 2014-01-13 Daniel Colascione Fix menu item updating in the presence of the Unity global menu diff --git a/src/textprop.c b/src/textprop.c index 3fff8c42b33..67f517182ea 100644 --- a/src/textprop.c +++ b/src/textprop.c @@ -1741,6 +1741,19 @@ Return t if any property was actually removed, nil otherwise. */) } len -= LENGTH (i); i = next_interval (i); + if(!i) + { + if (modified) + { + if (BUFFERP (object)) + signal_after_change (XINT (start), + XINT (end) - XINT (start), + XINT (end) - XINT (start)); + return Qt; + } + else + return Qnil; + } } } -- 2.30.2